package com.yfree.global

import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
import org.springframework.web.bind.annotation.ResponseBody

@ControllerAdvice
class YGlobalExceptionHandler : YController() {
    @ResponseBody
    @ExceptionHandler(Exception::class)
    fun error(e: Exception) = yGetResponseByException(e)
}
